//
//  NSString+GDNumber.m
//  GraduationDesign
//
//  Created by JiaKang.Zhong on 16/1/8.
//  Copyright © 2016年 JiaKang.Zhong. All rights reserved.
//

#import "NSString+GDNumber.h"

@implementation NSString (GDNumber)

+ (BOOL)isNumber:(NSString *)string{
    
    //判断是不是纯数字
    [NSCharacterSet decimalDigitCharacterSet];
    if ([[string stringByTrimmingCharactersInSet: [NSCharacterSet decimalDigitCharacterSet]] trimming].length >0) {
        return NO;
    }else{
         return YES;
    }

}

- (NSString *) trimming {
    
    return [self stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]];
}
@end
